package com.yupi.springbootinit.bizmq;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author FengHuan Wang
 * @Date 2025/2/14 15:42
 * @Version 1.0
 */
@Component
public class BiProducer {
    @Resource
    private RabbitTemplate rabbitTemplate;

    /**
     * 发送消息
     * @param message
     */
    public void send(String message){
        rabbitTemplate.convertAndSend("yubi", "yubi", message);
    }
}
